import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test1 {
    public static void main(String[] args) {
        Map map = new HashMap();
        System.out.println(map.size());
        map.put("班长","美国");
        map.put("学委","中国");
        map.put("体委","俄罗斯");
        map.put("文委","意大利");
     //   System.out.println(map.size());
     //  String s=(String) map.get("班长");
       // System.out.println(s);

      // map.remove("班长");
   // map.put("班长","中国");
     //   System.out.println(map);
        Set set = map.keySet();//获取当前map的键集合
        for(Object o: set){
            System.out.println(o);
        }
        Collection coll = map.values();//获取当前map的值集合
        for(Object o : coll){
            System.out.println(o);
        }
        Set set1 = map.entrySet();//返回当前Map集合中所有的entry(键值对)
        for(Object o: set1){
          //  System.out.println(o);
          Map.Entry entry = (Map.Entry)o;
          String key = (String)entry.getValue();
          String value = (String)entry.getValue();
            System.out.println(key+"======"+value);




        }



    }
}
